package praktikumid.w06.p3;

public class Vehicle {
	private int speed;
	private int gear;
	private String registrationNumber;
	
	public Vehicle(String registrationNumber) {
		setRegistrationNumber(registrationNumber);
	}

	/**
	 * @return the speed
	 */
	public int getSpeed() {
		return speed;
	}

	/**
	 * @param speed the speed to set
	 */
	public void setSpeed(int speed) {
			this.speed = speed;
	}

	/**
	 * @return the gear
	 */
	public int getGear() {
		return gear;
	}

	/**
	 * @param gear the gear to set
	 */
	public void setGear(int gear) {
		this.gear = gear;
	}

	/**
	 * @return the registrationNumber
	 */
	public String getRegistrationNumber() {
		return registrationNumber;
	}

	/**
	 * @param registrationNumber the registrationNumber to set
	 */
	public void setRegistrationNumber(String registrationNumber) {
		this.registrationNumber = registrationNumber.toUpperCase();
	}
	
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "regcode: " + registrationNumber;
	}
}
